<Worksheet ss:Name='Backlog Report'>
  <Table>
    <Column ss:AutoFitWidth="1" ss:Width="90" /> <!--Theme-->
    <Column ss:AutoFitWidth="1" ss:Width="45" /> <!--ID-->
    <Column ss:AutoFitWidth="1" ss:Width="240" /> <!--User Story-->
    <Column ss:AutoFitWidth="1" ss:Width="240" /> <!--Acceptance Criteria-->
    <Column ss:AutoFitWidth="1" ss:Width="240" /> <!--Comments-->
    <Column ss:AutoFitWidth="1" ss:Width="50" /> <!--Sprint-->
    <Column ss:AutoFitWidth="1" ss:Width="90" /> <!--Status-->
    <% if backlog.use_50_90? %>
      <Column ss:AutoFitWidth="1" ss:Width="45" /> <!--Score 50-->
      <Column ss:AutoFitWidth="1" ss:Width="45" /> <!--Score 90-->
    <% else %>
      <Column ss:AutoFitWidth="1" ss:Width="45" /> <!--Score -->
    <% end %>
    <% if backlog.cost_estimatable? %>
      <Column ss:AutoFitWidth="1" ss:Width="45" /> <!--Cost-->
    <% end %>
    <% if backlog.days_estimatable? %>
      <Column ss:AutoFitWidth="1" ss:Width="45" /> <!--Days-->
    <% end %>
    <Row ss:AutoFitHeight='0' ss:Height='18'>
      <Cell ss:MergeAcross='3' ss:StyleID='title'>
        <Data ss:Type='String'><%=
          if backlog.backlog_root
            "#{backlog.backlog_root.name} (Snapshot: #{backlog.name})"
          else
            backlog.name
          end
        %></Data>
      </Cell>
      <Cell ss:MergeAcross='4' ss:StyleID='top-base-stats'>
        <Data ss:Type='String'><%= if backlog.cost_estimatable?
                "#{t 'backlog.rate'}: #{backlog.rate_formatted}, "
              end %><%= if backlog.days_estimatable?
                "#{t 'backlog.velocity'}: #{backlog.velocity}"
              end %></Data>
      </Cell>
    </Row>
    <Row>
      <Cell ss:StyleID='table-header'>
        <Data ss:Type='String'><%= t 'backlog.theme' %></Data>
      </Cell>
      <Cell ss:StyleID='table-header'>
        <Data ss:Type='String'><%= t 'backlog.id' %></Data>
      </Cell>
      <Cell ss:StyleID='table-header'>
        <Data ss:Type='String'><%= t 'backlog.user_story' %></Data>
      </Cell>
      <Cell ss:StyleID='table-header'>
        <Data ss:Type='String'><%= t 'backlog.acceptance_criteria' %></Data>
      </Cell>
      <Cell ss:StyleID='table-header'>
        <Data ss:Type='String'><%= t 'backlog.comments' %></Data>
      </Cell>
      <Cell ss:StyleID='table-header'>
        <Data ss:Type='String'><%= t 'backlog.sprint' %></Data>
      </Cell>
      <Cell ss:StyleID='table-header'>
        <Data ss:Type='String'><%= t 'backlog.status' %></Data>
      </Cell>
      <% if backlog.use_50_90? %>
        <Cell ss:StyleID='table-header'>
          <Data ss:Type='String'><%= t 'backlog.points_50' %></Data>
        </Cell>
        <Cell ss:StyleID='table-header'>
          <Data ss:Type='String'><%= t 'backlog.points_90' %></Data>
        </Cell>
      <% else %>
        <Cell ss:StyleID='table-header'>
          <Data ss:Type='String'><%= t 'backlog.points' %></Data>
        </Cell>
      <% end %>
      <% if backlog.cost_estimatable? %>
        <Cell ss:StyleID='table-header'>
          <Data ss:Type='String'><%= t 'backlog.cost' %></Data>
        </Cell>
      <% end %>
      <% if backlog.days_estimatable? %>
        <Cell ss:StyleID='table-header'>
          <Data ss:Type='String'><%= t 'backlog.days' %></Data>
        </Cell>
      <% end %>
    </Row>
    <%= render :partial => 'table_theme', :collection => backlog.themes, :as => :theme, :locals => { :use_50_90 => backlog.use_50_90?, :total_columns => total_columns, :show_totals => true } %>
    <Row ss:AutoFitHeight='0' ss:Height='18'>
      <Cell ss:MergeAcross='3' ss:StyleID='backlog-summary'>
        <Data ss:Type='String'><%
          backlog_name = backlog.backlog_root ? backlog.backlog_root.name : backlog.name
          concat (t 'backlog.totals.backlog', :name => backlog_name)
        %></Data>
      </Cell>
      <Cell ss:MergeAcross='4' ss:StyleID='backlog-total'>
        <Data ss:Type='String'><%= export_totals(backlog) %></Data>
      </Cell>
    </Row>
  </Table>
  <WorksheetOptions xmlns='urn:schemas-microsoft-com:office:excel'>
    <PageLayoutZoom>0</PageLayoutZoom>
    <Selected />
    <Panes />
    <ProtectObjects>False</ProtectObjects>
    <ProtectScenarios>False</ProtectScenarios>
  </WorksheetOptions>
</Worksheet>